Introduction and Overview
Quality assurance test is defined as an activity to ensure that an organization is providing the best possible product or service to customers. The test plan includes the test for all unit tests for the backend services and the integration test for the restful controller. For the unit tests, we will use the JUnit testing framework, and then we will test the coverage of the code. We aim to achieve 80% of the code in this project.
Unit Testing
For the unit testing, we set up a test suite for every service in the backend. Then we run the test suite and analysis the coverage of the code. We have 9 classes in total, and for each class we need to test the class with creating an object which has all valid input, and for each input, we used the equivalence partitioning to test the cases that the input is not valid or null. For each test method in the service test class we used the delete method to delete the object that we create in the database, in this way we test how the delete method work.
1.Student
testCreatePerson()
testCreateStudentNull()
testCreateStudentSchoolNull()
For the test coverage of the studentService, the coverage achieved by the studentMockTest is 91.6%.
2.School
testCreateSchool()
testCreateSchoolNameNull()
For the test coverage of the schoolService, the coverage achieved by the schoolMockTest is 83.6%.
3.Tutor
testCreateTutor()
testCreateTutorNameNull()
For the test coverage of the tutorService, the coverage achieved by the subjectMockTest is 90.4%.
4.Registration
testCreateRegistration()
testCreateRegistrationNameNull()
For the test coverage of the registrationService, the coverage achieved by the subjectMockTest is 90.1%.
5.Session
testCreateSession()
For the test coverage of the SessionService, the coverage achieved by the roomMockTest 100%.
6.Subject
testCreateSubject()
testCreateSubjectNameNull()
For the test coverage of the SubjectService, the coverage achieved by the roomMockTest 90.9%.
7.Room
testCreateRoom()
testCreateRoomIdNull()
For the test coverage of the roomService, the coverage achieved by the roomMockTest 78.6%.
8.Bill
testCreateBill()
testCreateBillAmountNeg()
testCreateBillRegistrationNull()
testDeleteBill()
testDeleteBillByAmount()
For the test coverage of the roomService, the coverage achieved by the roomMockTest 100%.
9.Feedback
testCreateFeedback()
testCreateStudentNull()
testCreateFeedbackNull()
For the test coverage of the FeedbackService, the coverage achieved by the roomMockTest 100%.
Integration Test
For the integration test, the test plan we made is to use PostMan to test every single controller and see the respond results, in this way we can assure that we coverage every method just as the unit test.
1. Sign up
GET http://localhost:8080/schools
GET http://localhost:8080/schools/McGill
POST http://localhost:8080/schools/Concordia
POST http://localhost:8080/students/Alex/McGill
2. Get all tutors that teach searched course:
GET https://tutoringservice-backend-333.herokuapp.com/tutors_byCourse/COMP 202
3. Get a tutor by name:
GET http://localhost:8080/tutors/Erik
4. Send tutorial request:
Create a session: POST http://localhost:8080/tutorial_sessions?startTime=12:38&courseName=COMP 206&tutorName=Erik
Create a registration:POST https://tutoringservice-backend-333.herokuapp.com/tutorial_request/registration/?startTime=11:23&finishTime=12:23&tutorName=Erik&studentName=Alex
Create a bill:POST http://localhost:8080/tutorial_request/bills?amount=99.9®istrationNr=184
5. Student creates feedback for a tutor:
Student creates feedback for a tutor:POST http://localhost:8080/feedback?comment=heisanicetutor!®_time=123&studentid=3&rate=5
Show all tutorsfeedbacks of student:GET http://localhost:8080/tutorFeedbacks?studentName=mai
Show all studentsfeedback of a tutor:GET http://localhost:8080/all_student_feedbacks?tutor_name=Erik Lamela
Note: Although the controller works in the Postman by giving valid url input, we did not test the controller in JUnit test, so the coverage is 0% for the data transfer object. For increasing the coverage of the code in the JUnit test in the future, more JUnit test for testing the controller is needed.
Summary for the Software coverage and assurance

For the summary of the coverage, the services package and the testing package has a higher coverage compared with the data transfer object and the model package. The main reason for that is because all restful controller methods are tested by the Postman. As a consequence, the controller methods and data transfer object denotes 0 percent coverage. On the other hand, the coverage of the code in the model package, service package have coverage 98% and 90.1% respectively. (Note that Roomtype class and SchoolType class are both enumeration classes, which denotes relatively low coverage.) The test package also have a coverage of 83.7%, which is higher than our expectation as well. We believe that if the restful controller was tested in the JUnit test framework as well, the goal of achieving 80% could be achieved. In conclusion, the goal of higher than the 80% coverage is generally achieved in most packages, although the dto and controller packages have relatively low coverage.